
//{{{ file documentation -------------------------------------------------------

/*!
 * @file     config.cpp
 * @brief    dicodor configuration class implementation
 *
 *           some more details
 */

//}}} --------------------------------------------------------------------------
//{{{ includes -----------------------------------------------------------------

// @(#) $Id:$ <--- c'est quoi ces vermicelles ???

#include "config.h"
//#include "moc_config.cpp"	moc V5 sera incompatible V4

//}}} --------------------------------------------------------------------------
//{{{ Config -------------------------------------------------------------------
//}}} --------------------------------------------------------------------------
//{{{ .Config( QObject * parent ) ----------------------------------------------

Config::Config( QObject * parent ) :
	QSettings( parent )
{
}


//}}} --------------------------------------------------------------------------
//{{{ .void              setOptionDefaultFont(const QFont &font) ---------------

void Config::setOptionDefaultFont(const QFont &font)
{
	setValue ("optionDefaultFont", font);
}
//}}} --------------------------------------------------------------------------
//{{{ .void              setOptionUnderlineColor(const QColor &color)-----------

void Config::setOptionUnderlineColor(const QColor &color)
{
	setValue ("optionUnderlineColor", color);
}

//}}} --------------------------------------------------------------------------
//{{{ .void              setOptionSaveFormat(const QString &format) -----------

void Config::setOptionSaveFormat(const QString &format)
{
	setValue ("optionSaveFormat", format.toUtf8 ());
}

//}}} --------------------------------------------------------------------------
//{{{ .QFont Config::optionDefaultFont() const ----------------------------------

QFont Config::optionDefaultFont() const
{
	return value ("optionDefaultFont", QApplication::font ()).value<QFont> ();
}
//}}} --------------------------------------------------------------------------
//{{{ .QColor Config::optionUnderlineColor() const -----------------------------

QColor Config::optionUnderlineColor() const
{
	return value ("optionUnderlineColor", QColor (Qt::red)).value<QColor> ();
}

//}}} --------------------------------------------------------------------------
//{{{ .QColor Config::optionSaveFormat() const -----------------------------

QByteArray Config::optionSaveFormat () const
{
	return value ("optionSaveFormat", QByteArray ("plaintext")).value<QByteArray>();
}

//}}} --------------------------------------------------------------------------

